observations
Class PhenomenonType

java.lang.Object
  extended byobservations.DomainObject
      extended byobservations.PhenomenonType
All Implemented Interfaces:
DomainInterface

public class PhenomenonType
extends DomainObject

PhenomenonType Is a particular type of phenomenon, e.g. 'bloodpressure' or 'heartrate'. The class is part of the Fowler-patterns 'Measurement' and 'Observation'.

Version:
2004-09-10
Author:
Sascha Hemminger
See Also:
Measurement

Constructor Summary
PhenomenonType(java.lang.String name)
          Constructs a PhenomenonType object with name.
 
Method Summary
static PhenomenonType get(java.lang.String name)
          Searches a type by name.
 java.util.Hashtable getMappingTable()
          Gives a hashtable of all phenomena.
 java.util.Enumeration getPhenomenaEnumeration()
          Gives all phenomena for the type.
 Phenomenon getPhenomenonIncluding(Quantity quantity)
          Searches the phenomenon which includes a particular quantity.
 Phenomenon getPhenomenonNamed(java.lang.String name)
          Searches a particular phenomenon by name.
 PhenomenonType persist()
          Saves the type to main memory.
 void setPhenomena(java.lang.String[] names)
          Sets the valid phenomena, e.g.
 void setValidRange(QuantityRange range)
          Sets the overall range including all phenomena, e.g. if the valid range is 0 - 200 mm/Hg, there may be two phenomena 'low' and 'high' with ranges 0 - 100 mm/Hg and 100 - 200 mm/Hg.
 boolean validRangeIncludes(Quantity quantity)
          Tests whether the quantity is included in the types over all range.
 
Methods inherited from class observations.DomainObject
getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhenomenonType

public PhenomenonType(java.lang.String name)
Constructs a PhenomenonType object with name.

Parameters:
name - name of the type
See Also:
DomainObject.DomainObject(String)
Method Detail

get

public static PhenomenonType get(java.lang.String name)
Searches a type by name.

Parameters:
name - name of the type
Returns:
the found type

getMappingTable

public java.util.Hashtable getMappingTable()
Gives a hashtable of all phenomena.

Returns:
the hashtable with all phenomena

getPhenomenaEnumeration

public java.util.Enumeration getPhenomenaEnumeration()
Gives all phenomena for the type.

Returns:
enumeration of all phenomena

getPhenomenonIncluding

public Phenomenon getPhenomenonIncluding(Quantity quantity)
Searches the phenomenon which includes a particular quantity.

Parameters:
quantity - quantity to test
Returns:
the phenomenon of a particular quantity

getPhenomenonNamed

public Phenomenon getPhenomenonNamed(java.lang.String name)
Searches a particular phenomenon by name.

Parameters:
name - name of the phenomenon
Returns:
phenomenon if found else null

persist

public PhenomenonType persist()
Saves the type to main memory.

Returns:
the type.

setPhenomena

public void setPhenomena(java.lang.String[] names)
Sets the valid phenomena, e.g. 'low' and 'high'.

Parameters:
names - phenomena's names

setValidRange

public void setValidRange(QuantityRange range)
Sets the overall range including all phenomena, e.g. if the valid range is 0 - 200 mm/Hg, there may be two phenomena 'low' and 'high' with ranges 0 - 100 mm/Hg and 100 - 200 mm/Hg.

Parameters:
range - the overall range of the type

validRangeIncludes

public boolean validRangeIncludes(Quantity quantity)
Tests whether the quantity is included in the types over all range.

Parameters:
quantity - quantity to test
Returns:
true if the quantity is a valid quantity